package cn.tedu.bonfire.front.content.dao.persist.mapper;

import cn.tedu.bonfire.front.content.pojo.entity.Article;
import cn.tedu.bonfire.front.content.pojo.vo.*;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ArticleMapper extends BaseMapper<Article> {



    /**
     * 根据ID查询文章
     *
     * @param id 文章ID
     */
    ArticleStandardVO getStandardById(Long id);

    /**
     * 查询推荐的文章列表
     *
     */
    List<ArticleListItemVO> listByRecommend();

    //查询热门的文章列表
    List<ArticleListItemVO> listByHot();
    /**
     * 根据文章类别查询其文章列表
     *
     * @param categoryId 文章类别的ID
     */
    List<ArticleListItemVO> listByCategory(Long categoryId);


    List<UserCollectListVO> selectMyArticle(Long userId);
    int updateViewCountById(Long id);

    List<UserCollectListVO> getIsrecommend();

    List<UserCollectListVO> selectCollect(Long authorId);

     ArticleAuthorVO getAuthorByArticleId(Long id);

    List<UserDraftListVO> selectdraft(Long userId);

    List<UserCollectListVO> selectMyAuditArticle(Long userId);

    List<UserCollectListVO> selectLike(Long userId);

    UserDraftListVO selectDraftDetail(Long authorId, Long articleId);
    Long selectSumLike(Long userId);

    Long selectView(Long userId);

    Long selectCountcollect(Long userId);

    Long selectCount(Long userId);
}
